# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=tree
pkgver=1.7.0
pkgrel=1
pkgdesc="A directory listing program displaying a depth indented list of files"
arch=('i686' 'x86_64')
url="http://mama.indstate.edu/users/ice/tree/"
license=('GPL')
depends=('msys2-runtime')
source=(http://mama.indstate.edu/users/ice/${pkgname}/src/${pkgname}-${pkgver}.tgz
        'Makefile-Uncomment-for-Cygwin.patch')
sha256sums=('6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12'
            '4e3b7f5448aa1d80ad7c449a1294b0a54836446ef1c5e76e83e78aba12526eb3')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -p1 -i ${srcdir}/Makefile-Uncomment-for-Cygwin.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make prefix="${pkgdir}/usr" MANDIR="${pkgdir}/usr/share/man/man1" install
}
